package com.briup.jz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.jz.bean.AccountApply;
import com.briup.jz.bean.AccountApplyExample;
import com.briup.jz.bean.Category;
import com.briup.jz.bean.CategoryExample;
import com.briup.jz.dao.AccountApplyMapper;
import com.briup.jz.service.IAccountApplyService;
import com.briup.jz.utils.CustomerException;
@Service
public class AccountApplyServiceImpl implements IAccountApplyService{
	@Autowired
	private AccountApplyMapper accountApplyMapper;
	
	public List<AccountApply> selectByExample(AccountApplyExample example){
		return accountApplyMapper.selectByExample(example);
	}
	public void deleteByPrimaryKey(Long id) {
		accountApplyMapper.deleteByPrimaryKey(id);
	}
	public AccountApply selectByPrimaryKey(Long id) {
		return accountApplyMapper.selectByPrimaryKey(id);
		
	}
	public int updateByPrimaryKey(AccountApply record) {
		accountApplyMapper.updateByPrimaryKey(record);
		return 0;
	}
	@Override
	public void saveOrUpdate(AccountApply accountapply) {
		// TODO Auto-generated method stub
		if(accountapply.getId()!=null) {
			accountApplyMapper.updateByPrimaryKey(accountapply);
		} else {
			accountApplyMapper.insert(accountapply);
		}
	}
	//@Override
	/*public int insert(AccountApply record) {
		// TODO Auto-generated method stub
		return 0;
	}*/
	

}
